home *** CD-ROM | disk | FTP | other *** search
/ In Focus Guide to Better Photography / In Focus Guide to Better Photography.iso / portfoli.dxr / 00008.ls < prev    next >
Encoding:
Text File  |  1997-07-07  |  2.8 KB  |  93 lines

  1. global gVidBreakTimesList, PHOTOBASESTART, PHOTOBASESECTIONOFFSET, VIDEOCASTBASE, gCurPerson, gMouseDownSpriteNum
  2.  
  3. on startMovie
  4.   assignStartMovie(#portfolio, 2)
  5. end
  6.  
  7. on stopMovie
  8.   assignStopMovie()
  9. end
  10.  
  11. on assignSectionSpecificInit
  12. end
  13.  
  14. on initForPerson person
  15.   set gCurPerson to person
  16.   set PHOTOBASESTART to 60 + ((person - 1) * 10)
  17.   set PHOTOBASESECTIONOFFSET to 5
  18.   set VIDEOCASTBASE to 40 + ((person - 1) * 3)
  19.   set gVidBreakTimes3 to list()
  20.   set gVidBreakTimes4 to list()
  21.   case person of
  22.     1:
  23.       set gVidBreakTimes1 to list(0, 3028, 4080, 5820, 6600)
  24.       set gVidBreakTimes2 to list(0, 2940, 3368, 4980, 5544)
  25.     2:
  26.       set gVidBreakTimes1 to list(0)
  27.       set gVidBreakTimes2 to list(0, 960, 1830, 2828)
  28.     3:
  29.       set gVidBreakTimes1 to list(0, 1740)
  30.       set gVidBreakTimes2 to list(0, 2728, 4620, 5400)
  31.     4:
  32.       set gVidBreakTimes1 to list(0)
  33.       set gVidBreakTimes2 to list(0)
  34.     5:
  35.       set gVidBreakTimes1 to list(0, 20 * 60, 2514, 3372)
  36.       set gVidBreakTimes2 to list(0, 42 * 60, 51 * 60, 62 * 60, 71 * 60)
  37.   end case
  38.   set gVidBreakTimesList to list(gVidBreakTimes1, gVidBreakTimes2, gVidBreakTimes3, gVidBreakTimes4)
  39.   initAssignPreloads(2)
  40.   visVideoButtons()
  41.   set the visible of sprite 19 to 1
  42. end
  43.  
  44. on visNameClickOnSprites showHide
  45.   repeat with ix = 20 to 24
  46.     set the visible of sprite ix to showHide
  47.   end repeat
  48. end
  49.  
  50. on doResume
  51.   put the text of cast (54 + (gCurPerson - 1)) into field 30
  52.   cursor(-1)
  53.   play frame string(gCurPerson)
  54. end
  55.  
  56. on SMPTEtoTicks hours, minutes, seconds, frames, framesPerSecond
  57.   set totalSeconds to (hours * 60 * 60) + (minutes * 60) + seconds
  58.   return integer((totalSeconds * 60) + (float(float(frames) / float(framesPerSecond)) * 60.0))
  59. end
  60.  
  61. on visVideoButtons
  62.   if the locH of sprite 13 > 2000 then
  63.     set the locH of sprite 13 to the locH of sprite 13 - 2000
  64.     set the locH of sprite 14 to the locH of sprite 14 - 2000
  65.     set the locH of sprite 15 to the locH of sprite 15 - 2000
  66.   end if
  67. end
  68.  
  69. on doChoosePersonMouseUp
  70.   set the mouseUpScript to EMPTY
  71.   dontPassEvent()
  72.   set clickOnName to (gMouseDownSpriteNum >= 20) and (gMouseDownSpriteNum <= 24)
  73.   set clickOnPhoto to (gMouseDownSpriteNum >= 26) and (gMouseDownSpriteNum <= 30)
  74.   if clickOnName then
  75.     set person to gMouseDownSpriteNum - 20 + 1
  76.   else
  77.     set person to gMouseDownSpriteNum - 26 + 1
  78.   end if
  79.   if clickOnPhoto then
  80.     set the castNum of sprite 1 to 14 + (person - 1)
  81.     updateStage()
  82.     set the visible of sprite 25 to 0
  83.   end if
  84.   set nameSprite to 20 + (person - 1)
  85.   set loc to point(the locH of sprite nameSprite + (the width of sprite nameSprite / 2), the locV of sprite nameSprite + the height of sprite nameSprite)
  86.   animateWithSound(5, 111, 8, loc, "underline snd", 20)
  87.   if clickOnName then
  88.     set the castNum of sprite 1 to 14 + (person - 1)
  89.   end if
  90.   initForPerson(person)
  91.   cursor(-1)
  92. end
  93.